livepatch/arm/x86: Check payload for for unwelcomed symbols.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 13 Sep 2016 17:15:07 +0000 (13:15 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 28 Sep 2016 02:06:49 +0000 (22:06 -0400)
commite04977e0c0c1aa50d7d1ca1f172af587776040a3
treeaaf16a4b255b2996cf4a541e840c2a792bb39d5d
parent725e8e66c6cdbf973e172a17eac2763818bcf401
livepatch/arm/x86: Check payload for for unwelcomed symbols.

Certain platforms, such as ARM [32|64] add extra mapping symbols
such as $x (for ARM64 instructions), or more interesting to
this patch: $t (for Thumb instructions). These symbols are supposed
to help the final linker to make any adjustments (such as
add an veneer). But more importantly - we do not compile Xen
with any Thumb instructions (which are variable length) - and
if we find these mapping symbols we should disallow such payload.

Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/arch/arm/arm32/livepatch.c
xen/arch/arm/arm64/livepatch.c
xen/arch/x86/livepatch.c
xen/common/livepatch_elf.c
xen/include/xen/livepatch.h